package wef.PW.utils;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class SendReward {

    /**
     * 发送报文
     */
    public static boolean Send(Socket socket, String reward) {
        OutputStream outputStream = null;
        try {
            outputStream = socket.getOutputStream();
            outputStream.write(StrUtils.hexStrToByteArray(reward));
            outputStream.flush();
            return true;
        } catch (IOException e) {
            e.printStackTrace();
            return false;
        }finally {
            outputStream = null;
        }
    }
}
